package edu.gdkm.extendsdemo;

public class Teacher extends Person {
    private String course;

    public String getCourse() {
        return course;
    }

    public void setCourse(String course) {
        this.course = course;
    }
    //多态：方法的覆盖
    public void say(){
        super.say();
        System.out.println(this.getCourse());
    }
    public void introduction(){
        System.out.println("----------------------------");
        System.out.println("大家好！我是一名教师！");
        super.say();
        System.out.println("----------------------------");
    }
}
